package com.wicket.okrapp.web.contorller;

import com.wicket.okrapp.biz.service.CalcTargetContentService;
import com.wicket.okrapp.biz.service.dto.req.*;
import com.wicket.okrapp.biz.service.dto.res.*;
import com.wicket.okrapp.common.ro.OkrResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/app/calcTargetContent/")
public class CalcTargetContentController {

  @Autowired
  CalcTargetContentService calcTargetContentService;
/**
   * D3初始化目标内容父子中周期(公共)
   */
    @PostMapping("implementInitializeTargetContFatherSubMidCycleCom")
    public OkrResult<ImplementInitializeTargetContFatherSubMidCycleComRespDto> implementInitializeTargetContFatherSubMidCycleCom(@RequestBody @Validated ImplementInitializeTargetContFatherSubMidCycleComReqDto reqDTO){
    return OkrResult.success(calcTargetContentService.implementInitializeTargetContFatherSubMidCycleCom(reqDTO));
    }
/**
   * D3初始化目标内容父子周期(公共)
   */
    @PostMapping("implementInitializeTargetContFatherAndSubCycleCom")
    public OkrResult<ImplementInitializeTargetContFatherAndSubCycleComRespDto> implementInitializeTargetContFatherAndSubCycleCom(@RequestBody @Validated ImplementInitializeTargetContFatherAndSubCycleComReqDto reqDTO){
    return OkrResult.success(calcTargetContentService.implementInitializeTargetContFatherAndSubCycleCom(reqDTO));
    }
/**
   * D3执行更新目标周期同体情况(公共)
   */
    @PostMapping("implementUpdateTargetCycleHomomorphicCom")
    public OkrResult<ImplementUpdateTargetCycleHomomorphicComRespDto> implementUpdateTargetCycleHomomorphicCom(@RequestBody @Validated ImplementUpdateTargetCycleHomomorphicComReqDto reqDTO){
    return OkrResult.success(calcTargetContentService.implementUpdateTargetCycleHomomorphicCom(reqDTO));
    }
/**
   * D3初始化目标内容中期(公共)
   */
    @PostMapping("implementInitializeTargetContMidCycleCom")
    public OkrResult<ImplementInitializeTargetContMidCycleComRespDto> implementInitializeTargetContMidCycleCom(@RequestBody @Validated ImplementInitializeTargetContMidCycleComReqDto reqDTO){
    return OkrResult.success(calcTargetContentService.implementInitializeTargetContMidCycleCom(reqDTO));
    }
/**
   * D3回写目标周期权重等信息(公共)
   */
    @PostMapping("implementRewriteTargetCycleWeightEtcInfoCom")
    public OkrResult<ImplementRewriteTargetCycleWeightEtcInfoComRespDto> implementRewriteTargetCycleWeightEtcInfoCom(@RequestBody @Validated ImplementRewriteTargetCycleWeightEtcInfoComReqDto reqDTO){
    return OkrResult.success(calcTargetContentService.implementRewriteTargetCycleWeightEtcInfoCom(reqDTO));
    }
/**
   * D3循环更新单模版目标周期进展状态(公共)
   */
    @PostMapping("loopUpdateSingleEvaTempTargetCycleStatusCom")
    public OkrResult<LoopUpdateSingleEvaTempTargetCycleStatusComRespDto> loopUpdateSingleEvaTempTargetCycleStatusCom(@RequestBody @Validated LoopUpdateSingleEvaTempTargetCycleStatusComReqDto reqDTO){
    return OkrResult.success(calcTargetContentService.loopUpdateSingleEvaTempTargetCycleStatusCom(reqDTO));
    }
}
